<!DOCTYPE html>
<meta charset="utf-8" />
<title>Element with same color as background</title>

<style>
  #overlay,
  #hidden {
    background: blue;
    width: 50px; height: 50px;
  }
  
  #hidden {
    margin-top: -50px;
  }
</style>

<div id="overlay"></div>
<div id="hidden"></div>
